{:W('Template/top')}
<div class="wrapper clearfix content" style="position: relative;border: 1px solid #ddd">
    {:W('Template/left')}
    <div class="rightbox pull-right">
        <div class="ur-here">您当前的位置：<a href="#">运营商账户余额管理</a>&gt;运营商账户充值记录</div>
        <div class="cTitle2">运营商账户充值记录</div>
        <in name="Think.session.role_id" value="$operatorData">
            <input type="hidden" class="operatorId" value="{$oid}">

            <div class="status">
                <label>运营商：</label>
                <a class="nav-operator-state nav-operator-state0"
                   href="{:U('Credit/index', array('id' => I('get.id'), 'oid' => 0))}" style="margin-left:5px;">全部
                </a>
                <foreach name="operatorList" item="vo">
                    <a class="nav-operator-state nav-operator-state{$vo.id}"
                       href="{:U('Credit/index', array('id' => I('get.id'), 'oid' => $vo['id']))}">{$vo.display_name}
                    </a>
                </foreach>
            </div>
        </in>
        <form method="post" action="">
            <input type="hidden" id="code" value="{$Think.session.checkApplyCode}">
            <input type="hidden" id="showProof" value="{:U('Agency/showProofInfo')}">
            <input id="invoiceList" type="hidden" value="{:U('Credit/updateProof')}"/>
            <input id="chkState" type="hidden" value="{:U('Credit/index')}"/>
            <table class="cTable table-hover" width="100%">
                <tr>
                    <th width='8%'>编号</th>
                    <th width='18%'>名称</th>
                    <th width='10%'>金额</th>
                    <th width='10%'>充值类型</th>
                    <th width='15%'>状态</th>
                    <if condition="($Think.session.role_id eq 1) or ($Think.session.role_id eq 185)">
                        <th width='12%'>凭证</th>
                    </if>
                    <th width='15%'>充值时间</th>
                    <if condition="($Think.session.role_id eq 1) or ($Think.session.role_id eq 185)">
                        <th width='12%'>操作</th>
                    </if>
                </tr>
                <volist name='info' id='v'>
                    <tr>
                        <td>{$v.id}</td>
                        <td>{$v.entity_name}</td>
                        <td id="money-right" class='text-c5'><dfn>&yen;{$v.amount|GetYuan}</dfn></td>
                        <td class="text-c1">
                            <if condition="$v['topup_type'] eq 1">
                                现金充值
                                <elseif condition="$v['topup_type'] eq 2"/>
                                刷卡充值
                                <elseif condition="$v['topup_type'] eq 3"/>
                                支票充值
                                <elseif condition="$v['topup_type'] eq 4"/>
                                银行转账
                                <elseif condition="$v['topup_type'] eq 5"/>
                                支付宝转账
                            </if>
                        </td>
                        <td>
                            <if condition="$v.state eq 1">
                                <span style="color:blue">已提交,待审核</span>
                                <elseif condition="$v.state eq 2"/>
                                <span style="color:darkgreen">已审核</span>
                                <elseif condition="$v.state eq 3"/>
                                <span style="color:red">已拒绝</span>
                            </if>
                        </td>
                        <if condition="($Think.session.role_id eq 1) or ($Think.session.role_id eq 185)">
                            <td class="text-c1">{$v.proof_type} {$v.proof_code}</td>
                        </if>
                        <td>{$v.create_time}</td>
                        <if condition="($Think.session.role_id eq 1) or ($Think.session.role_id eq 185)">
                            <td>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
                                            aria-expanded="false">
                                        操作<span class="caret"></span>
                                    </button>
                                    <if condition="$v['state'] eq 1">
                                        <ul class="dropdown-menu" role="menu">
                                            <li><a href="javascript:void(0)"
                                                   onclick="changeApplyState({$v.id}, '{$v.id|setEncrypt}',{$v.operator_id}, '{:Common\\Top::ApplyStatePass}')">已审核</a>
                                            </li>
                                            <li><a href="javascript:void(0)"
                                                   onclick="changeRejectState({$v.id}, '{$v.id|setEncrypt}',  {$v.operator_id}, '{:Common\\Top::ApplyStateReject}')">拒绝</a>
                                            </li>
                                        </ul>
                                        <else/>
                                        <ul class="dropdown-menu" role="menu">
                                            <li><a href="javascript:void(0)"
                                                   onclick="updateProof({$v.id}, '{$v.id|setEncrypt}', {$v.state}, 5)">更新凭证</a>
                                            </li>
                                        </ul>
                                    </if>
                                </div>
                            </td>
                        </if>
                    </tr>
                </volist>
            </table>
        </form>
        <notempty name="info">
            <div class="pagebox">
                {$page}
            </div>
        </notempty>
    </div>
</div>


<div class="modal fade" id="myModalEdit" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:300px">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    填写凭证信息
                </h4>
            </div>
            <div class="modal-body">
                凭证类型：
                <input type="text" class="proof_type form-control" style="border:1px solid #e5e5e5">

                <p>
                    凭证号码：
                    <input type="text" class="proof_code form-control" style='border:1px solid #e5e5e5'>

                <p>
            </div>
            <div class="modal-footer">
                <div class="pull-right">
                    <button type="button" class="btn btn-primary doSubmitTopup">
                        确定
                    </button>
                    <button type="button" class="btn btn-default cancel"
                            data-dismiss="modal">关闭
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>

{:W('Template/bottom')}
<script src="__PUBLIC__/js/credit.js?v=1"></script>
</body>
</html>